//
//  LLNWReachabilityManager.h
//  LLFoundation
//
//  Created by my_liu on 2016/11/14.
//  Copyright © 2016年 . All rights reserved.
//

#import <Foundation/Foundation.h>
#import "LLNWReachabilityInterface.h"

/**
 *  网络状态变化Notification的key
 */
#define LLNWStatusChangedNotification @"LLNWStatusChangedNotification"

/**
 从有网 到 无网
 */
#define LLNWStatusReachToNoneNotification  @"LLNWStatusReachToNoneNotification"

/**
 从无网 到 有网
 */
#define LLNWStatusNoneToReachNotification @"LLNWStatusNoneToReachNotification"

/**
 *  网络状态变化Notification中userinfo的key
 */
#define LLNWStatusUserInfoKey @"LLNWStatusUserInfoKey"

/**
 *  网络状态枚举
 */
typedef enum LLNWStatus {
    
    /**
     *  未知状态
     */
    LLNWStatusUnknow = 0,
    /**
     *  断网状态
     */
    LLNWStatusNoReachable = 1,
    /**
     *  wifi状态
     */
    LLNWStatusWifi = 2,
    /**
     *  3G/EDGE/CDMA 状态
     */
    LLNWStatusWWAN = 3
} LLNWStatus;

@interface LLNWReachabilityManager : NSObject

- (void)startMonitoring;

- (void)stopMonitoring;

- (LLNWReachabilityStatus)networkReachabilityStatus;

- (BOOL)isReachable;

- (BOOL)isReachableViaWWAN;

- (BOOL)isReachableViaWiFi;

/**
 *  当前网络状态
 */
@property (nonatomic,assign) LLNWStatus status;
@end
